Multimedia API Reference

September 12, 2016 | 24.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nvosd.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
29 #ifndef __NVOSD_DEFS__
30 #define __NVOSD_DEFS__
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
40 typedef struct _NvOSD_ColorParams {
41  double red;
44  double green;
47  double blue;
50  double alpha;
53 
54 
58 typedef struct _NvOSD_FontParams {
59  char * font_name;
62  unsigned int font_size;
66 
67 
72 typedef struct _NvOSD_TextParams {
73  char * display_text;
75  unsigned int x_offset;
77  unsigned int y_offset;
82 
83 
87 typedef struct _NvOSD_RectParams {
88  unsigned int left;
90  unsigned int top;
92  unsigned int width;
94  unsigned int height;
96  unsigned int border_width;
101  unsigned int has_bg_color;
104  unsigned int reserved;
109 
113 typedef enum{
122 } NvOSD_Mode;
123 
129 void *nvosd_create_context(void);
130 
137 void nvosd_destroy_context(void *nvosd_ctx);
138 
150 void nvosd_set_clock_params(void *nvosd_ctx, NvOSD_TextParams *clk_params);
151 
152 
173 int nvosd_put_text(void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_strings,
174  NvOSD_TextParams *text_params_list);
175 
176 
205 int nvosd_draw_rectangles(void *nvosd_ctx, NvOSD_Mode mode, int fd,
206  int num_rects, NvOSD_RectParams *rect_params_list);
207 
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif
struct _NvOSD_ColorParams NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
unsigned int y_offset
Holds vertical offset w.r.t top left pixel of the frame.
Definition: nvosd.h:77
int nvosd_draw_rectangles(void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_rects, NvOSD_RectParams *rect_params_list)
Overlays boxes at given location on a buffer.
Holds the font parameters of the text to be overlayed.
Definition: nvosd.h:58
int nvosd_put_text(void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_strings, NvOSD_TextParams *text_params_list)
Overlays clock and given text at given location on a buffer.
Holds the box parameters of the box to be overlayed.
Definition: nvosd.h:87
unsigned int top
Holds top coordinate of the box in pixels.
Definition: nvosd.h:90
void nvosd_destroy_context(void *nvosd_ctx)
Destroys NvOSD context.
unsigned int height
Holds height of the box in pixels.
Definition: nvosd.h:94
NvOSD_ColorParams border_color
Holds color params of the border of the box.
Definition: nvosd.h:98
unsigned int reserved
Definition: nvosd.h:104
NvOSD_Mode
List modes used to overlay boxes and text.
Definition: nvosd.h:113
struct _NvOSD_TextParams NvOSD_TextParams
Holds the text parameters of the text to be overlayed.
unsigned int x_offset
Holds horizontal offset w.r.t top left pixel of the frame.
Definition: nvosd.h:75
void nvosd_set_clock_params(void *nvosd_ctx, NvOSD_TextParams *clk_params)
Sets clock parameters for the given context.
char * display_text
Holds the text to be overlayed.
Definition: nvosd.h:73
unsigned int left
Holds left coordinate of the box in pixels.
Definition: nvosd.h:88
double alpha
Holds alpha component of color.
Definition: nvosd.h:50
Selects NV HW engine for rectangle draw and mask.
Definition: nvosd.h:118
char * font_name
Holds pointer to the string containing font name.
Definition: nvosd.h:59
NvOSD_ColorParams font_color
Holds font color.
Definition: nvosd.h:64
struct _NvOSD_RectParams NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Holds the text parameters of the text to be overlayed.
Definition: nvosd.h:72
struct _NvOSD_FontParams NvOSD_FontParams
Holds the font parameters of the text to be overlayed.
Selects CPU for OSD processing.
Definition: nvosd.h:114
unsigned int width
Holds width of the box in pixels.
Definition: nvosd.h:92
Holds the color parameters of the box or text to be overlayed.
Definition: nvosd.h:40
unsigned int has_bg_color
Holds boolean value indicating whether box has background color.
Definition: nvosd.h:101
unsigned int border_width
Holds border_width of the box in pixels.
Definition: nvosd.h:96
double blue
Holds blue component of color.
Definition: nvosd.h:47
double red
Holds red component of color.
Definition: nvosd.h:41
unsigned int font_size
Holds size of the font.
Definition: nvosd.h:62
void * nvosd_create_context(void)
Creates NvOSD context.
NvOSD_FontParams font_params
font_params.
Definition: nvosd.h:80
double green
Holds green component of color.
Definition: nvosd.h:44
Selects GPU for OSD processing.
Definition: nvosd.h:116
NvOSD_ColorParams bg_color
Reserved field for future usage.
Definition: nvosd.h:107